<?php
/*
	[Destoon B2B System] Copyright (c) 2008-2011 Destoon.COM
	This is NOT a freeware, use is subject to license.txt
*/
require 'common.inc.php';
require 'include/recordFind.class.php';
include load('find.lang');
if (!isset($_REQUEST['type'])){
	$type = 'company';
} elseif ($type == 'all' || !in_array($type, RecordFind::$tables)) {
	$type = 'company';
}
if (!$kw) {
	Prompt::alert($L['kw_empty'], $DT_REF);
}
$searchModule = array(
	'company' => '企业黄页',
	'mall'=>'讯都商城',
	'sell' => '招商供求',
	'job' => '职位',
	'resume' => '简历'
	);
$recordCounts = array();
$records = '';
foreach (RecordFind::$tables as $key => $value) {
	$find = new RecordFind($value);
	$recordCounts[$value] = $find->getCount($kw);
	if ($value == $type) {
		$records = $find->getResults($page, $kw);
		$pages = $find->getPages($page);
	}
}
include template('index', 'find');